// //////////////////////////////////////////////////////////
// Hotkeys
// //////////////////////////////////////////////////////////
window.addEventListener("keypress",BCAkeyboardAction,true);

function BCAkeyboardAction (e) {
    if(window.name == '' || e.ctrlKey) return;
    if (e.target.nodeName.toUpperCase() == 'INPUT') return;
    var keynum = e.which;
    var key = String.fromCharCode(keynum).toLowerCase();
    
    if (key == "l") BCAprocessQL ();
}

function BCAprocessQL () {
    var sec = localStorage.getItem ('po_bca_use_sec_ql');
    var ql = sec=="true"?localStorage.getItem ('po_bca_sec_ql'):localStorage.getItem ('po_bca_prim_ql');
    var qlInstalled = localStorage.getItem ('po_bca_ql_installed');
    if (!qlInstalled) {
        document.getElementById ("qltextarea").value = ql;
        localStorage.setItem ('po_bca_ql_installed', "true");
        document.modes.apply_ql.click ();
    } else {
        localStorage.removeItem ('po_bca_ql_installed');
        document.modes.confirm.click ();
    }
}
// //////////////////////////////////////////////////////////
// End: Hotkeys
// //////////////////////////////////////////////////////////